<div id="orderdialog" title="Онлайн бронирование" style="display:none;">
<form name="ordering" id="ordering">
  <table class="form">
    <tr>
                                <?php global $current_user;
							  get_currentuserinfo();?>
							  
							

      <th><label for="field_fio"><b>Ф.И.О.</b>:</label></th>
      <td><input type="text" title="Введите ваше Ф.И.О" class="field tooltip" name="field_fio" id="field_fio" value="<? if (is_user_logged_in()) { echo $current_user->user_firstname .' '. $current_user->user_lastname; }?>" /></td>
    </tr>
    <tr>
      <th><label for="field_phone"><b>Ваш телефон</b>:</label></th>
      <td><input type="text" title="Введите ваш телефон в формате: +7 901 912 21 45" class="field tooltip" name="field_phone" id="field_phone" value="<?php  if (is_user_logged_in()) { the_author_meta('cellphone'); } ?>" /></td>
    </tr>
    <tr>
      <th><label for="field_datein"><b>Дата заезда</b>:</label></th>
      <td><input type="date" class="field orderdates" name="field_datein" id="field_datein" style="width: 100px" />
      	<img src="<?php bloginfo('template_url'); ?>/layout/images/date.png" alt="" style="margin-top: -2px;" />
        </td>
    </tr>
    <tr>
      <th><label for="field_dateout"><b>Дата отъезда</b>:</label></th>
      <td><input type="date" class="field orderdates" name="field_dateout" id="field_dateout" style="width: 100px" />
      <img src="<?php bloginfo('template_url'); ?>/layout/images/date.png" alt="" style="margin-top: -2px;" />
        
      </td>
    </tr>
    <tr>
      <th></th>
      <td><span id="order_totaldays">12</span>
      </td>
    </tr>
    <tr>
      <th><label for="field_avans">Аванс в размере:</label></th>
      <td><div class="checkbox">
          <input type="checkbox" id="field_avans" name="field_avans" value="0" />
          <span class="green">10 % от стоимости квартиры в сутки</span></div></td>
    </tr>
    <tr>
      <th><label for="field_pay">Оплата через:</label></th>
      <td><select title="Выберите из списка удобный для Вас способ оплаты." name="field_payment" id="payment_selector" class="field tooltip" style="float: left">
                <option>Выбрать</option>

      <?php 
		$k26_payments = get_option('k26_order_payment_type');
																	$p_type = explode(", ", $k26_payments);
																		foreach ($p_type as $key){
																			echo '<option value="'.$key.'">'.$key.'</option>';
																		}
																		?>
        </select>
        <a href="#"><img src="<?php bloginfo('template_url'); ?>/layout/images/32x32_sms.png" alt="" style="margin-top: -3px;" /></a>
        
        </td>
    </tr>
    <tr>
      <td colspan="2"><hr /></td>
    </tr>
    <tr>
      <th><label for="field_trans">Заказать трансфер <br />
          (такси):</label></th>
      <td><div class="checkbox">
          <input type="checkbox" id="field_trans" name="field_trans" value="0" />
          <span class="green">По городу бесплатно!</span></div>
        <ul class="reset">
        <?php 
		$k26_transfers = get_option('k26_order_transfer');
																	$k_trans = explode(", ", $k26_transfers);
																		foreach ($k_trans as $key){
																			echo '<li>'.$key.'</li>';
																		}
																		?>
          <li>Другие варианты по телефону: <b>+7 9288255152</b></li>
        </ul></td>
    </tr>
    <tr>
      <th><label for="field_date">Время встречи:</label></th>
      <td><input type="text" title="Дата отъезда" class="field tooltip meetdate" name="field_date" id="field_date" style="float: left; width: 100px" />
        <a href="#"><img src="<?php bloginfo('template_url'); ?>/layout/images/date.png" alt="" style="float: left; margin-top: -2px;" /></a>
        <input type="text" title="Время отъезда" class="field tooltip" name="field_time" id="field_time" style="float: left; width: 75px" />
        <a href="#"><img src="<?php bloginfo('template_url'); ?>/layout/images/time.png" alt="" style="float: left; margin-top: -2px;" /></a></td>
    </tr>
    <tr>
      <th><label for="field_place">Место встречи:</label></th>
      <td><input type="text" title="Место встречи" class="field tooltip" name="field_place" id="field_place" /></td>
    </tr>
    <tr>
      <th><label for="field_count">Сколько Вас:</label></th>
      <td><input type="text" title="Сколько Вас?" class="field tooltip" name="field_count" id="field_count" /></td>
    </tr>
    <tr>
      <td colspan="2"><hr /></td>
    </tr>
    <tr>
      <th><label for="field_note">Пожелания:</label></th>
      <td><textarea cols="3" title="Пожелания" class="field" name="field_note" id="field_note" ></textarea></td>
    </tr>
    <tr>
      <th><label for="field_mail">E-mail:</label></th>
      <td><input type="text" title="Введите ответ" class="field tooltip" name="field_mail" id="field_mail" /></td>
    </tr>
  </table>
  <br />
  <div class="summbox">
    <h4>Сумма за квартиру в сутки: <?php $app_single_price = get_post_meta($post->ID, 'kv26_loc_price_13', true); echo $app_single_price; ?> рублей</h4>
    <h3 class="green">Итого за квартиру: 4000 рублей</h3>
  </div>
  <div class="formsubmit">
  	<input type="hidden" name="price" value="doapporder" />
    <input type="hidden" name="action" value="add-order" />
  	<input type="hidden" name="fulladress" value="<?php the_title() ?>" />
  	<input type="hidden" name="app_id" value="<?php the_ID() ?>" />
  	<input type="hidden" name="url" value="<?php the_permalink() ?>" />
  	<input type="hidden" name="status" value="new" />
    <input class="button" type="submit" id="submitorder" value="Отправить">
  </div>
</form>  
</div>

